<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>欢迎你：<s:property value="#session.ad.adminName"/></title>

<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="css/jquery-2.1.0.min.js"></script>
<script src="css/bootstrap.min.js"></script>
<script type="text/javascript"></script>
<script src="js/jquery-2.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/default2.css">
<link rel='stylesheet prefetch' href='css/font-awesome.min.css'>
<link rel="stylesheet" type="text/css" href="css/styles3.css">
<style>
.inputmp {
	padding-left: 210px;
}

th {
	text-align: center;
}

a {
	color: #fff;
}

a:HOVER {
	color: #fff;
}
</style>
</head>
<body>
	
	<section class="strips">
			
			
		<!-- 管理用户 -->
		<article class="strips__strip">
			<div class="strip__content">
				<h1 class="strip__title" data-name="Dolor">管理用户</h1>
				<div class="strip__inner-text">
					<h2>删除用户</h2>
					<p>坚决打击违反法律条规用户！</p>
					<table class="table table-bordered">
						<thead>
							<tr style="text-align: center;">
								<th>ID</th>
								<th>用户名</th>
								<th>密码</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						<s:if test="#session.usersList.size()!=0">
						<s:iterator value="#session.usersList" var="users" status="st">
							<tr>
								
								<td><s:property value="#st.count"/></td>
								<td><s:property value="#users.usersName"/></td>
								<td><s:property value="#users.usersPwd"/></td>
								<td><s:a href="admin_delete?usersId=%{#users.id}">删除用户</s:a></td>
							</tr>
						</s:iterator>
						
						</s:if>
						<s:else>
							<tr>
								<td colspan="4">数据库没有用户信息！</td>
							</tr>
						</s:else>
						</tbody>
					</table>
					<s:a href="admin_forWard"><button type="button" class="btn btn-primary">返回</button></s:a>
				</div>
				
			</div>
		</article>
		
		<!-- 全部用户信息 -->
		<article class="strips__strip">
			<div class="strip__content">
				<h1 class="strip__title" data-name="Amet">用户</h1>
				<div class="strip__inner-text">
					<h2>用户信息</h2>
					<p>请勿泄漏用户信息！</p>
					<table class="table table-bordered">
						<thead>
							<tr style="text-align: center;">
								<th>ID</th>
								<th>用户</th>
								<th>密码</th>
							</tr>
						</thead>
						<tbody>
							<s:if test="#session.usersList.size()!=0">
						<s:iterator value="#session.usersList" var="users" status="st">
							<tr>
								
								<td><s:property value="#st.count"/></td>
								<td><s:property value="#users.usersName"/></td>
								<td><s:property value="#users.usersPwd"/></td>
							</tr>
						</s:iterator>
						
						</s:if>
						<s:else>
							<tr>
								<td colspan="4">数据库没有用户信息！</td>
							</tr>
						</s:else>
						</tbody>
					</table>
						<s:a href="admin_forWard"><button type="button" class="btn btn-info">返回</button></s:a>
				</div>

			</div>
		</article>
		
		<!-- 用户操作提示 -->
		<article class="strips__strip">
				<h1 class="strip__title" data-name="Amet" style="color: black;" >Tip</h1>
				<h3 style="color: black;"><s:property value="#request.tip"/></h3>
		</article>
		
		<!-- 全部用户书签 -->
		<article class="strips__strip">
			<div class="strip__content">
				<h1 class="strip__title" data-name="Amet">书签</h1>
				<div class="strip__inner-text">
					<h2>用户书签</h2>
					<p>请勿泄漏用户信息！</p>
					<table class="table table-bordered">
						<thead>
							<tr style="text-align: center;">
								<th>ID</th>
								<th>用户</th>
								<th>书签</th>
								<th>名称</th>
							</tr>
						</thead>
						<tbody>
							<s:if test="#session.booksList.size()!=0">
						<s:iterator value="#session.booksList" var="books" status="st">
							<tr>
								
								<td><s:property value="#st.count"/></td>
								<td><s:property value="#books.users.usersName"/></td>
								<td><s:property value="#books.books_url"/></td>
								<td><s:property value="#books.books_name"/></td>
							</tr>
						</s:iterator>
						
						</s:if>
						<s:else>
							<tr>
								<td colspan="4">数据库没有用户书签信息！</td>
							</tr>
						</s:else>
						</tbody>
					</table>
						<s:a href="admin_forWard"><button type="button" class="btn btn-warning">返回</button></s:a>
				</div>

			</div>
		</article>
			 
			 <!-- 管理书签 -->
		<article class="strips__strip">
			<div class="strip__content">
				<h1 class="strip__title" data-name="Dolor">管理书签</h1>
				<div class="strip__inner-text">
					<h2>删除书签</h2>
					<p>坚决打击违反法律条规书签！</p>
					<table class="table table-bordered">
						<thead>
							<tr style="text-align: center;">
								<th>ID</th>
								<th>用户名</th>
								<th>书签</th>
								<th>名称</th>
								<th>删除</th>
							</tr>
						</thead>
						<tbody>
							<s:if test="#session.booksList.size()!=0">
						<s:iterator value="#session.booksList" var="books" status="st">
							<tr>
								
								<td><s:property value="#st.count"/></td>
								<td><s:property value="#books.users.usersName"/></td>
								<td><s:property value="#books.books_url"/></td>
								<td><s:property value="#books.books_name"/></td>
								<td><s:a href="admin_deleteBooks?booksId=%{#books.id}">删除</s:a></td>
							</tr>
						</s:iterator>
						
						</s:if>
						<s:else>
							<tr>
								<td colspan="5">数据库没有用户书签信息！</td>
							</tr>
						</s:else>
						</tbody>
					</table>
					<s:a href="admin_forWard"><button type="button" class="btn btn-danger">返回</button></s:a>
				</div>
			</div>
		</article>
		<i class="fa fa-close strip__close"></i>
	</section>

	<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
	<script>
		var Expand = function() {
			var tile = $('.strips__strip');
			var tileLink = $('.strips__strip > .strip__content');
			var tileText = tileLink.find('.strip__inner-text');
			var stripClose = $('.strip__close');
			var expanded = false;
			var open = function() {
				var tile = $(this).parent();
				if (!expanded) {
					tile.addClass('strips__strip--expanded');
					tileText.css('transition',
							'all .6s 1s cubic-bezier(0.23, 1, 0.32, 1)');
					stripClose.addClass('strip__close--show');
					stripClose.css('transition',
							'all .6s 1s cubic-bezier(0.23, 1, 0.32, 1)');
					expanded = true;
				}
			};
			var close = function() {
				if (expanded) {
					tile.removeClass('strips__strip--expanded');
					tileText.css('transition',
							'all 0.15s 0 cubic-bezier(0.23, 1, 0.32, 1)');
					stripClose.removeClass('strip__close--show');
					stripClose.css('transition',
							'all 0.2s 0s cubic-bezier(0.23, 1, 0.32, 1)');
					expanded = false;
				}
			};
			var bindActions = function() {
				tileLink.on('click', open);
				stripClose.on('click', close);
			};
			var init = function() {
				bindActions();
			};
			return {
				init : init
			};
		}();
		Expand.init();
	</script>
</body>
</html>

